package com.woniuxy02;

import java.util.Scanner;

public class Test08 {
    public static void main(String[] args) {
//        Scanner scanner=new Scanner(System.in);
//        System.out.println("是否开始游戏y/n");
//        String answer=scanner.next();
//        while (answer.equals("y")){
//            System.out.println("玩一把游戏");
//            System.out.println("是否开始游戏y/n");
//            answer=scanner.next();
//        }

//        System.out.println("程序结束");


        Scanner scanner = new Scanner(System.in);
        String answer ="";
        do{
            System.out.println("是否开始游戏y/n");
            answer=scanner.next();
            if(!answer.equals("y")){
                break;
            }
            System.out.println("玩一把");
        }while (answer.equals("y"));
        System.out.println("over");

    }
}
